@extends('layouts.admin')
@section('content')
<style>
	.uyrse{
		background-color: #409EFF;
		color:#fff;
		border:none;
		height:25px;
		display:inline-flex;
		justify-content:center;
		align-items:center;
		position:relative;
		top:-2px;
		border-radius:3px;
	}
	.uyrse2{
		background-color: #409EFF;
		color:#fff;
		border:none;
		height:25px;
		display:inline-flex;
		justify-content:center;
		align-items:center;
		position:relative;
		top:-2px;
		border-radius:3px;
		padding:3px 10px;
		margin-left:15px;
	}
	.btndiv{
		width:100%;height:40px;margin: -10px 0 10px 0;
		display:none;
		flex-direction:row;
		justify-content:flex-start;
		align-items:center;
	}
</style>
<div id="allmap" class="allmap"></div>
<div class="pane">

	
	<!--第一-->
	<div class="btnSearch diyi-s" style="margin-bottom:10px;">
		<input type="text" class="sousuors" name="company" id="company" placeholder='请输入物资名称'/><button class="uyrse" id="btnSearch">搜  索</button>
		<div class="btndiv" id="btndiv">
			<button class="uyrse2" onclick="tomap1()">只显示隐患</button>
			<button class="uyrse2" onclick="tomapall()">显示全部</button>
		</div>
		<div class="layui-form-item0">
			<label class="layui-form-label0">企业：</label>
			<div class="layui-input-block0">
				@foreach($categories as $cate)
				@if($cate['type']==1) 
				
					<div class="tuyes easyui-linkbutton l-btn l-btn-small layui-input-block0">
						<input style="" class="easyui-checkbox" name="category" value="{{$cate['id']}}" label="{{$cate['name']}}">
					</div>
				@endif
				@endforeach
		    </div>
		</div>
		<div class="layui-form-item0">
			<label class="layui-form-label0">住户：</label>	
			<div class="layui-input-block0">
				@foreach($categories as $cate)
				@if($cate['type'] == 2)
				
					<div class="tuyes easyui-linkbutton l-btn l-btn-small layui-input-block0" style="display: inline-block;">
					
						<input style="" class="easyui-checkbox" name="category" value="{{$cate['id']}}" label="{{$cate['name']}}">
					</div>
				@endif 
				@endforeach
		    </div>
		</div>
		<div class="layui-form-item0">
			<label class="layui-form-label0">九小场所：</label>
			<div class="layui-input-block0">
				@foreach($categories as $cate)
				@if($cate['type'] == 9)
				
				    <div class="tuyes easyui-linkbutton l-btn l-btn-small layui-input-block0" style="display: inline-block;">
				
						<input style="" class="easyui-checkbox" name="category" value="{{$cate['id']}}" label="{{$cate['name']}}">
					</div>
				@endif
				@endforeach
	        </div>
	    </div>
    </div>
	<div class="tabs-wrap"  id="hues"  style="margin-left: 0px; margin-right: 0px; ">

	</div>

	<div class="iushe  diyi-s" id="result" style="">
        <table id="qyList" class="hovertable" style="width: 100%">
        	<tbody class="companyList" id="companyList">
               
      		</tbody>
      	</table>
	</div>          	
	<!--第二-->
	<div class="btnSearch  dier-s">
		<input type="text" class="sousuors" name="log_company" id="log_company" value=""/><button class="uyrse" id="logBtnSearch">搜  索</button>
	</div>
	
	<div class="iushe dier-s" id="result" style="">
        <table id="qyList-2" class="hovertable" style="width: 100%">
        	<tbody class="companyList" id="checkLog">
               
      		</tbody>
      	</table>
	</div>      
</div>

<script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=9DbR7Ge0vRY3qtiPeVStVve3"></script>
<script type="text/javascript" src="/js/admin/map3.js"></script>
<script>
	var refurl = document.referrer;
	if (refurl.indexOf("mapall") > -1 || refurl.indexOf("map") > -1) {
		document.getElementById("btndiv").style.display = "flex";
	}
	function tomap3(){
		window.location.href='/admin/map3'
	}
	function tomap1(){
		window.location.href='/admin/map'
	}
	function tomapall(){
		window.location.href='/admin/mapall'
	}
</script>
@endsection
